 

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/support/swpmtvmcode/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/support/swpmtvmcode',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/support/swpmtvmcode/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/support/swpmtvmcode/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/support/swpmtvmcode',
    method: 'put',
    data: obj
  })
}
/*
export function saveBatch(body) {
  return request({
    url: '/support/swpmtvmcode/import',
    headers: { "Content-Type": "multipart/form-data" },
    method: 'post',
    data: body
  })
}*/
export function tvmCodeImport(body) {
  return request({
    url: "/support/swpmtvmcode/import",
    headers: { "Content-Type": "multipart/form-data" },
    method: "post",
    data: body
  })
}
/**
 * tvm编号模板下载
 * @param {*} query 
 * @returns 
 */
 export function templateKY(query) {
  return request({
    url: "/support/swpmtvmcode/exportTamplate", 
    method: 'get',
    responseType: 'blob',
    params: query
  }) 
}
